package com.hnkywl.sts.entity.jggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.organ.Ck;
import com.hnkywl.sts.entity.sys.Gg;
import com.hnkywl.sts.entity.xsgl.Kh;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created by Melody on 14-3-11.
 */
@Entity
@Table(name = "T_BIZ_JGDMX")
@Where(clause = "deleted!='1'")
public class Jgdmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqJgdmx", allocationSize = 1, sequenceName = "SEQ_BIZ_JGDMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqJgdmx")
    private Long id;

    /**
     * 卡号
     */
    @ManyToOne
    @JoinColumn(name = "KH_ID")
    private Kh kh;

    /**
     * 具体物资
     */
    @ManyToOne
    @JoinColumn(name = "JTWZ_ID")
    private Gg jtwz;

    /**
     * 仓库
     */
    @ManyToOne
    @JoinColumn(name = "CK_ID")
    private Ck ck;

    /**
     * 产地
     */
    @ManyToOne
    @JoinColumn(name = "SJZDZ_CD_ID")
    private Sjzdz cd;

    /**
     * 申报数量
     */
    private Double sbsl = 0d;

    /**
     * 申报重量
     */
    private Double sbzl = 0d;

    /**
     * 件重
     */
    private Double jz;

    /**
     * 加工数量
     */
    private Double jg_sbsl = 0d;

    /**
     * 加工重量
     */
    private Double jg_sbzl = 0d;

    /**
     * 备注
     */
    private String bz;

    /**
     * 状态，0:出库，1：入库
     */
    private String zt;

    /**
     * 加工单
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JGD_ID")
    private Jgd jgd;

    /**
     * 标识
     * @return
     */
    private String sku;

    /**
     * 仓储单号
     */
    private String ccNO;

    /**
     * 是否冲销
     */
    private boolean sfcx = false;

    /**
     * false(0):冲销单没有进行审核，true(1)：冲销单已经审核通过
     */
    private Boolean sftzd = false;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Boolean getSftzd() {
        return sftzd;
    }

    public void setSftzd(Boolean sftzd) {
        this.sftzd = sftzd;
    }

    public Kh getKh() {
        return kh;
    }

    public void setKh(Kh kh) {
        this.kh = kh;
    }

    public Gg getJtwz() {
        return jtwz;
    }

    public void setJtwz(Gg jtwz) {
        this.jtwz = jtwz;
    }

    public Double getSbsl() {
        return sbsl;
    }

    public void setSbsl(Double sbsl) {
        this.sbsl = sbsl;
    }

    public Double getSbzl() {
        return sbzl;
    }

    public void setSbzl(Double sbzl) {
        this.sbzl = sbzl;
    }

    public Double getJg_sbsl() {
        return jg_sbsl;
    }

    public void setJg_sbsl(Double jg_sbsl) {
        this.jg_sbsl = jg_sbsl;
    }

    public Double getJg_sbzl() {
        return jg_sbzl;
    }

    public void setJg_sbzl(Double jg_sbzl) {
        this.jg_sbzl = jg_sbzl;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Jgd getJgd() {
        return jgd;
    }

    public void setJgd(Jgd jgd) {
        this.jgd = jgd;
    }

    public Ck getCk() {
        return ck;
    }

    public void setCk(Ck ck) {
        this.ck = ck;
    }

    public Sjzdz getCd() {
        return cd;
    }

    public void setCd(Sjzdz cd) {
        this.cd = cd;
    }

    public Double getJz() {
        return jz;
    }

    public void setJz(Double jz) {
        this.jz = jz;
    }

    public String getZt() {
        return zt;
    }

    public void setZt(String zt) {
        this.zt = zt;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public String getCcNO() {
        return ccNO;
    }

    public void setCcNO(String ccNO) {
        this.ccNO = ccNO;
    }

    public boolean isSfcx() {
        return sfcx;
    }

    public void setSfcx(boolean sfcx) {
        this.sfcx = sfcx;
    }
}
